<template>
  <div>
    <span>{{name}}</span> &nbsp;
    <button @click="add(index)">+</button>&nbsp;
    <span>{{count}}</span>&nbsp;
    <button @click="shao(index)">-</button>
  </div>
</template>

<script>

export default {
   props: ['name', 'index', 'count'],
  methods:{
    add(index){
      this.$emit('addGoods',index)
    },
    shao(index){
      this.$emit('shaoGoods',index)
    }
  }

}
</script>

<style>

</style>